Ext.define('TS.model.sale.SaleBillDetailModel',{
	extend: 'Ext.data.Model',	
	fields: [
	  {name: 'id',type:'int'},
	  {name: 'billId',type:'int'},
	  {name: 'productId',type:'int'},
	  {name: 'batchNoId',type:'int'},
	  {name: 'invAddId',type:'int'},
	  {name: 'direct',type:'int'},
	  {name: 'quantity',type:'float'},
	  {name: 'taxRate',type:'float'},
	  {name: 'price',type:'float'},
	  {name:'amount',type:'float'},
	  {name: 'settlePrice',type:'float'},
	  {name: 'costPrice',type:'float'},
	  {name: 'remark',type:'string'}
	],
	associations:[
	  {type: 'hasOne',model: 'TS.model.base.ProductModel',associatedName:'product',associationKey:'product'},
	  {type: 'hasOne',model: 'TS.model.inv.ProductBatchNoModel',associatedName: 'batchNo',associationKey:'batchNo'},
	  {type: 'hasOne',model: 'TS.model.common.InventoryAddModel',associatedName: 'invAdd',associationKey:'invAdd'}
	 ]
});

/*private Long id;
	private Long billId;
	private Integer productId;
	private Long batchNoId;
	private Integer invAddId;
	private Integer direct;
	private BigDecimal quantity;
	private BigDecimal taxRate = new BigDecimal("0.17");
	private BigDecimal price;
	private BigDecimal settlePrice;
	private BigDecimal costPrice = BigDecimal.ZERO;
	private String remark;
	
	private Product product;
	private ProductBatchNo batchNo;
	private InventoryAdd invAdd;*/